
   <html>
   <head>
   <style type=text/css>
   body { font-size: 10pt; font-family: Arial; }
   </style>
   </head>
   <body>
   
</br>
</br>
<font color="darkred">#include</font>&nbsp;&lt;stdio.h&gt;</br>
<font color="darkred">#include</font>&nbsp;&lt;stdlib.h&gt;</br>
<font color="darkred">#include</font>&nbsp;&lt;ds/stack.h&gt;</br>
</br>
</br>
void&nbsp;add_elements(void&nbsp;*stack_<font color="darkgreen">int</font>)</br>
{</br>
</br>
&nbsp;&nbsp;&nbsp;STACK_PTR(tmp_stack,&nbsp;<font color="darkgreen">int</font>);</br>
&nbsp;&nbsp;&nbsp;tmp_stack&nbsp;=&nbsp;stack_<font color="darkgreen">int</font>;</br>
</br>
&nbsp;&nbsp;&nbsp;STACK_PUSH(tmp_stack,&nbsp;43);</br>
&nbsp;&nbsp;&nbsp;pr<font color="darkgreen">int</font>f("push:&nbsp;%d\n",&nbsp;STACK_GET(tmp_stack));</br>
</br>
&nbsp;&nbsp;&nbsp;STACK_PUSH(tmp_stack,&nbsp;31);</br>
&nbsp;&nbsp;&nbsp;pr<font color="darkgreen">int</font>f("push:&nbsp;%d\n",&nbsp;STACK_GET(tmp_stack));</br>
}</br>
</br>
</br>
<font color="darkgreen">int</font>&nbsp;main()</br>
{</br>
&nbsp;&nbsp;&nbsp;STACK_CREATE(stack,&nbsp;<font color="darkgreen">int</font>);</br>
</br>
</br>
&nbsp;&nbsp;&nbsp;add_elements(stack);</br>
</br>
&nbsp;&nbsp;&nbsp;STACK_PUSH(stack,&nbsp;17);</br>
&nbsp;&nbsp;&nbsp;pr<font color="darkgreen">int</font>f("push:&nbsp;%d\n",&nbsp;STACK_GET(stack));</br>
</br>
&nbsp;&nbsp;&nbsp;STACK_PUSH(stack,&nbsp;23);</br>
&nbsp;&nbsp;&nbsp;pr<font color="darkgreen">int</font>f("push:&nbsp;%d\n",&nbsp;STACK_GET(stack));</br>
</br>
&nbsp;&nbsp;&nbsp;STACK_PUSH(stack,&nbsp;2);</br>
&nbsp;&nbsp;&nbsp;pr<font color="darkgreen">int</font>f("push:&nbsp;%d\n",&nbsp;STACK_GET(stack));</br>
</br>
&nbsp;&nbsp;&nbsp;STACK_PUSH(stack,&nbsp;3);</br>
&nbsp;&nbsp;&nbsp;pr<font color="darkgreen">int</font>f("push:&nbsp;%d\n",&nbsp;STACK_GET(stack));</br>
</br>
</br>
&nbsp;&nbsp;&nbsp;pr<font color="darkgreen">int</font>f("pop:&nbsp;%d\n",&nbsp;STACK_GET(stack));</br>
&nbsp;&nbsp;&nbsp;STACK_POP(stack);</br>
</br>
&nbsp;&nbsp;&nbsp;pr<font color="darkgreen">int</font>f("pop:&nbsp;%d\n",&nbsp;STACK_GET(stack));</br>
&nbsp;&nbsp;&nbsp;STACK_POP(stack);</br>
</br>
</br>
&nbsp;&nbsp;&nbsp;STACK_DESTROY(stack);</br>
</br>
&nbsp;&nbsp;&nbsp;<font color="#6d4d00">return</font>&nbsp;0;</br>
}</br>
</br>
</br>
</br>
</body></html>
